<include file='public/_meta'>

<if condition="$cars['supplier_no'] == 1376920001">
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
        <span class=""> <a class="btn btn-primary radius" onclick="handle('{$cars['cardcode']}','WTX9806')" href="javascript:;"><i class="Hui-iconfont">&#xe6f7;</i> 重启车机</a></span>  
        <span class="ml-50"> <a class="btn btn-success radius" onclick="handle('{$cars['cardcode']}','WTX9802')" href="javascript:;"><i class="Hui-iconfont">&#xe6c5;</i> 短信开门</a></span>
        <span class="ml-50"> <a class="btn btn-warning radius" onclick="handle('{$cars['cardcode']}','WTXSIMR')" href="javascript:;"><i class="Hui-iconfont">&#xe679;</i> 重启控制模块</a></span> 

        <span class="ml-50"> <a class="btn btn-primary radius" onclick="handle('{$cars['cardcode']}','WTX####')" href="javascript:;"><i class="Hui-iconfont">&#xe679;</i> 短信升级</a></span> 
        
    </div>

    <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
        <span class=""> <a class="btn btn-success radius" onclick="handle('{$cars['cardcode']}','WTX9800')" href="javascript:;"><i class="Hui-iconfont">&#xe6f7;</i> 切换平台0</a></span>  
        <span class="ml-50"> <a class="btn btn-warning radius" onclick="handle('{$cars['cardcode']}','WTX9801')" href="javascript:;"><i class="Hui-iconfont">&#xe6c5;</i> 切换平台1</a></span>
        <span class="ml-50"> <a class="btn btn-primary radius" onclick="handle('{$cars['cardcode']}','WTX9833')" href="javascript:;"><i class="Hui-iconfont">&#xe679;</i> 短信点火</a></span> 

        <span class="ml-50"> <a class="btn btn-danger radius" onclick="handle('{$cars['cardcode']}','WTX9844')" href="javascript:;"><i class="Hui-iconfont">&#xe679;</i> 短信熄火</a></span> 
    </div>
</div>
</if>

<if condition="$cars['supplier_no'] == 1376920002 || $cars['supplier_no'] == 1376920003">
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
        <span class=""> <a class="btn btn-primary radius" onclick="handle('{$cars['cardcode']}','#321456,DH')" href="javascript:;"><i class="Hui-iconfont">&#xe6c1;</i> 点火</a></span>  
        <span class="ml-50"> <a class="btn btn-success radius" onclick="handle('{$cars['cardcode']}','#321456,XH')" href="javascript:;"><i class="Hui-iconfont">&#xe6b2;</i> 熄火</a></span>
        <span class="ml-50"> <a class="btn btn-warning radius" onclick="handle('{$cars['cardcode']}','#321456,KS')" href="javascript:;"><i class="Hui-iconfont">&#xe605;</i> 开锁</a></span> 
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
        <span class="ml-50"> <a class="btn btn-success radius" onclick="handle('{$cars['cardcode']}','#321456,BS')" href="javascript:;"><i class="Hui-iconfont">&#xe60e;</i> 落锁</a></span> 
        <span class="ml-50"> <a class="btn btn-danger radius" onclick="handle('{$cars['cardcode']}','#836927,CQSZ')" href="javascript:;"><i class="Hui-iconfont">&#xe6f7;</i> 重启通讯</a></span> 
        <span class="ml-50"> <a class="btn btn-primary radius" onclick="handle('{$cars['cardcode']}','#321456,CANCQ')" href="javascript:;"><i class="Hui-iconfont">&#xe6f7;</i> 解析重启</a></span>
        
        <span class="ml-50"> <a class="btn btn-danger radius" onclick="handle('{$cars['cardcode']}','#836927,JCSZ,APN:CMIOT#')" href="javascript:;"><i class="Hui-iconfont">&#xe6f7;</i> 设置4G物联卡APN</a></span> 
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20 text-c">
        <span class="ml-50"> <a class="btn btn-success radius" onclick="handle('{$cars['cardcode']}','#836927,JCCX')" href="javascript:;"><i class="Hui-iconfont">&#xe60e;</i> 车况信息查询</a></span> 
        <span class="ml-50"> <a class="btn btn-warning radius" onclick="handle('{$cars['cardcode']}','#321456,JCCX')" href="javascript:;"><i class="Hui-iconfont">&#xe6f7;</i> 车机系统信息查询</a></span> 
        <span class="ml-50"> <a class="btn btn-primary radius" onclick="handle('{$cars['cardcode']}','#836927,JCSZ,APN:CMMTM#')" href="javascript:;"><i class="Hui-iconfont">&#xe60e;</i> 设置2G物联卡APN</a></span> 
    </div>
</div>

</if>

<!--_footer 作为公共模版分离出去-->
<include file='public/_footer'>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本--> 
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
function handle(cardcode,action) {
    layer.confirm('确认要操作吗？',function(index){
        // console.log('ss')
        $.ajax({
            type: 'GET',
            url: "{:url('index/message/operate')}",
            data:{
                'cardcode':cardcode,
                'action':action
            },
            dataType: 'json',
            success: function(data){
                if(data.result == 0){
                    console.log(111)
                
                    layer.msg('指令发送成功!',{icon:1,time:1000});
                }else{
                    layer.msg(data['msg']);
                }
                if(data.code==0){
                    top.location.href = "{:url('index/index/index')}"
                }
            },
            error:function(data) {
                console.log(data.msg);
            },
        });     
    });
    
}
</script> 
<!--/请在上方写此页面业务相关的脚本-->